package party.loveit.eosforandroidlibrary;

import android.util.Log;

import party.loveit.eosforandroidlibrary.rpc.vo.transaction.Transaction;

public class CreateAccount {

    public static String createAccount(CreateWalletMode mode) {
        Transaction transaction = null;
        try {
            Rpc rpc = new Rpc(mode.getEp() + "/");
            transaction = rpc.createAccount(mode.getPrivate_key(), mode.getCreator(), mode.getAccount(), mode.getOwner_pubkey(),
                    mode.getActive_pubkey(), mode.getBuy_ram_bytes(), mode.getStake_net_quantity(), mode.getStake_cpu_quantity(), 0l);
            Log.d("TAG_EOS", "createAccount : " + transaction.getTransactionId());
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return transaction.getTransactionId();
    }
}
